Fixed a bug in the hash writing