fixed shapefile schema import and moved the search of the metadata