Fixed new duplication algorithm