improve parsing when serial buffer is smaller than pkt size