Fixed zoom and pan bugs