bugfixes in viterbi mode with count collection