fix click event handler