Fixed panning bug