Fix permalink to search results bug