added graphics debug switching and fixing sequence of physics simulating - rendering