Fixed error in exclusion check