Fixed issue where duplicate items weren't detected