remove duplicate element error