properly handle split packets