fix spatialite lookups