Fix checksum check in deserialization