fix the database error