Fixed a bug when dragging the map around