Fix api generation.