fixed some update bugs