Fixed bug where structures were sharing event handlers.