fix huffman decoding bug