Make sure message parsing worked everywhere it is needed
This should fix issue #162.
Optimize padding