fixed a database error