Fixed bug leading to illegal names in URIs