fixing crazy database error