fix on click handler