fixed two bugs in record class