Fix apigen