fixed bug in AveragePerceptron using Viterbi