Fixes to the update method