fix bug when search command has no expr.