Fix crash on search