RotationY going crazy


I have a movieclip that moves according to the position of the mouse. It moves slighty around the y-axis (by about 10 degrees) when the mouse moves along the x-axis.

You can see this demonstrated here when you move the mouse across the stage:

I am getting a bug and I cant seem to get rid of it.

When I have my site open in the browser and I switch to a different application, then come back to the browser more often than not the rotationY is going crazy and flipping around 360 degrees continuously. (If you test it, it should happen, also happens when changing between tabs in browser sometimes)

I have tried listening out for the mouse leaving the stage with:

stage.addEventListener(Event.MOUSE_LEAVE, killFloat); 

and removing the Mouse Move listener, but doesnt seem to work

private function killFloat(event:Event):void {
            bothPanels.rotationY = 0;
            stage.removeEventListener(MouseEvent.MOUSE_MOVE, floatClip);

Can anyone help!