Fixed bug that caused panning to not stop