Fix API generation