Fix the problem that write obtained data at the previous data position.