Fix small read buffer related bug in recvLoop