fix bugs for updatestate