Fixed problem with panning