Fixed problems with adding a record: