fixed a bug with only_used and duplicates filter