Fixed double urlencoding problem in query API.