fixed object update method, and added test.