Fix massive socket read bug