fixed some bugs in receive1 and main1