Added code to avoid double slashed in URLs