Fix in checksum calculation condition