Updated click handler