types fix and native codegen