panning and bug fixes