Fixed issue with updating records