fix a write bug in the disk