fixed compatibility issues with cc