fixed fill_database