Updated to handle dupe in rules