Improves security when publishing events