more bugfixes for gpkg