Fix double encoded query in search-function