fixed double update bug