Fix physx exceptions

This should fix the PhysX crash and timing problems.
Please try!