fix bug related with receive distinguishing, also clean up some printings