Revert "Fix state_machine transition"

This reverts commit ac25ee640488d2a333b66bdc8861839f5dff4365.