Fixed a problem with URIs containing square brackets