fixed a bug in statemachines where the initial state of a SM or composite state was a junction