fixing how the metadata is read on the database.