Resetting the event listeners array so that events get added properly.
Merge pull request #1959 from flukeout/eventfixagain

Resetting the event listeners array so that events get added properly.