fix read bug