socket read fix