added some exclusion clauses and corrected an error accidentally introduced by merge