fix crash on search