Fix classrecord bugs involving errors on creation