Fix generated class compile errors