fixed bug in adv search