Fixed the bug in unique