fix state machine update method