             if (!_states) return;
             for each (var state:IState in _states)
             {
-                if (!state.subMachines) continue;
+                if (!(state && state.subMachines)) continue;
                 for each (var submachine:IFsm in state.subMachines)
                 {
                     f(submachine);

        public function reset():void
        {
            mapSubmachines(function(value:Object):void {
                if ("reset" in value)
                {
                    value.reset();
                }


        public function mapEvent(event:String, it:ITransition):void
        {
            _eventMap[event] || (_eventMap[event] = []);
            _eventMap[event].push(it);

            /* TODO
