Fix bug causing endianness of checksum not to match spec