fix history search with arrows