fixed the database error