State machine stuck issue