Fix for panning