Fix checksum offset calculation