Improved update method.