Debugged and fixed mostly receive()