Fixing bug that was causing double slashes in redirected url