Minor code simplification for writePacket
Clean up const variable that is no longer necessary