Added better error handling when modifications to the map geometry failed.