fixing click handler