fixed several bugs in forward C viterbi algorithm (not testable)