Padding fixes for markov