Hack: manually set packet length.