fix odd value write bug