fix the read bug, incorrent offset