Fix crash when not on search page.