Improve code generation for MCs.