Added the modules case when creating the emit message.