fixes searches and crash
build with spatialite