restricting search properly for select all/none.