fixed a bug in collect search