bug in update method resolved