Stopped some potential errors, and cleared the map whenever the location changes.