Fixed issue with updating record