Fixes a bug where messages are not emitted to all sockets.