fixed message decoding