Fixed transition stack depth for $stateNotFound scenario
minor refactor