Fixes history searching