fix up the api generation as well