Fix production of valid kml and geojson files