Fixed removeduplicates