Added function to clean cc mask