Fix some problems with uniqueContraints option