Handle extra spaces in the list of URIs