Fix for getLineLatLngs and getPolygonLatLngs