Testing and minor fix for message encoder