Bug fix in Duplication check.