Correct problem with duplicate entries