avoid to include geometries and fixes lot of problems realted to sql queries