fix final state transitions, fix traversing junction