fixed a bug, which caused decoded message to have extra-symbols in its end