bugfix. Would only modify the given url and return it, instead of creating a modified copy.