fixing some message decoding problems