Fix: crash when invoking #call_api_method