[bugfix] Aplly endianness conversion to the checksum too

Otherwise we get corrupted checksums upon reading the data.