Fix history-substring-search not working