Fixing duplicate items issue