Fixed panning bug, fixes #31.