Fixed name of event handling function