Fixed codegen for switch-case.