fixed some recv bugs