fix some bugs in updates to handle versions in gpkg, still needs more work