fixed some unicode and urlquote issues