fix apigen