Fix type error in intermediate code generation.