Fixed bug in javascript that was interfering with our API calls and map plotting on click