Merge "Fix for a runtime exception that could occur with bad redirects"