fix url encoding when using URIs