Fix types for mpackets, mevents and mcommands.