X8 almost Crashed trying to level

Hello, I posted a few days ago about having some issues tuning a 5kg X8. After many hours of tuning I got it flying smoothly and locked in.

However it almost crashed twice after trying to return to level While in loiter or altHold modes.
As you can see below from the DesPitch and actual pitch it seems like it overshoots the 0 degrees target by over 40degrees and then just keeps on rocking back and forth until I switch to acro or hits the ground…

I know similar issues are due to low PIDs but mine are pretty high

PID 0,45 0,2 0,035 Stabilize 5,5

I’d greatly appreciate it if you could take a look at the log:

The issue happens at 950s, here’s a screenshot to see what I’m talking about:

Thanks a bunch!

SOLVED: This was caused by a conflict between leveling the copter and holding the desired altitude. It’s documented here at the bottom of the page: http://ardupilot.org/copter/docs/autotune.html

The wobble upon releasing the sticks was caused by this value ATC_THR_MIX_MAX.
I increased it to 0.9 and the problem was gone. I also decreased ATC_ACCEL_R_MAX to smoothen everything out. Now it flies like a dream.