Fixed some bugs related to path-less URIs