process packet size correctly