If you use transitions and nodes, you don't get the benefits of states "remembering" their previous location.
Like you described, that "after(2,sec)" starts being tested as soon as you enter the "ON" state, and not as soon as "a" becomes 1.
I would recommend using substates inside "ON" to do this logic. For example, try the following:

- Sebastian
