checksum calculation fix