Fix sending broadcast events, add a unit test respectively

Broadcast events did not work, and it seemed to be because of a typo. Fixed the problem and added a test that makes sure broadcast events are sent to subscribers that are not subscribed to any events.