Fixed an important bug in packet buffering (two packets received in the same recv would'nt be processed correctly)