fixing minor bug when clicking on the map