fixed broken search var handling