fixed minor things in viterbi