Fixed bug in new recv code