remove duplication from directory rules