Fix linked state machine incorrectly share one instance bug