fixed bug when updating records
fixed bug when updating records