fix packet construction to pass milestone tests