fix the database