Fixed the checksum method