fix search crash bug