fix parallel in code_ex