Fix packet size serialization.