fix unterminal state transfer bug