codegen: make conditionals work