resolved incorrect recv[0] value issue