Bug fixes in updateRecord