Fix the socket read problem