finally fix the genesis block writing issue