Made the SQL-GeoJSONconversion more reliable