fix a read bug