Fix the seg fault error caused by search region.