fix bad read bug when on peer close