codegen: correct argument handling