Fixed bugs in huffman coding C++ program