Fixed bug in unique