Fix unique index error