Fix bug in duplication detection
Add comments