min search for select fix