fixed ordering of state in markov expansion