fix click functionality