Fix errors for invalid classnames in the db