Fixed an issue with rotation while panning