Make sure you have a VSYNC in there. Not sure why it would go back to it's original position, but that would explain the flying off the screen bit