fix search field crash bug