fix the bug that data can't write to disk