legs: fix regression in search

Signed-off-by: diditclear <didyourupgradeclear@gmail.com>