fixed lin checksum calculation