Fixes digging out the previous search query