Fixes invalid redirect URL