Fixed namespacing problem in event handler