some hmm training fixes