Unique index minor bug fix