Really fixed remove duplicate entries

Fixed problems with the the deletion of duplicate entries.