Fixing duplicate error when creating different resources with same name