fix location encoding for URL