fix packet shrinking problem