bug fix of function C()