Fixed packet retrieving; Added blocking loop for receiving