Fixed issue with update method