fix code generation for conditional expressions