Fixes a bug about centering the camera and resizing the view