Added stopPropagation to prevent duplicate click events.