minor fixes and added recvall func