Fix deduplication bug.
Merge pull request #46 from rbart/dedupBugFix

Fix deduplication bug.