Fix the problem about computing checksum

Also add checking checksum after receive a packet