api: fix dynamic invocation.