Corrected a bug in unique, which cannot handle array