fix flatten and uniq of Array