fixed issue with state machine where state changes outside update() where
not detected