Fix some urlencode and parse errors