Fixing bug where search query is appended to URL even if it doesn't exist!