fixup to generate_messages to replace the proper fields