Improve search mode behavior