fix some errors in the physics engine