Fix some checks on the DB.