fixed a small bug in shell.js related to event broadcasts.

Fixed a small bug with event broadcast