fix read/write offset miss.