Fixed some bugs when recentering the camera.