Changed so the module can publish only the payload if needed