Fixes bug with tag/value checksum writing.

Signed-off-by: Ahmed H. Ismail <ahm3d.hisham@gmail.com>