Fix search string behavior

(also use a real queue)