Fix small bug in CDiff calculations