fix redirect after call_api