Fixed generation of msgs.