Fix codegen If statements