prevent empty uri
minor change