search: fix warnings
fix bug in 522baf03fbbd