fix history search