Fix click event handler