Fixing duplicate entry issue.