Revert "viterbi bug"

This reverts commit ea6f60bc0fcc03dfa7e839f9a8f9fe3baf9a71f9.