Better create a new URI object instead of modifying the one passed as a parameter.