Fix event handler to actually work.