Fixed panning problem