Fixed a bug in the url join method