fix condition for ignoring click