Fixing nonunique exception