change 4 bytes packet length to 2 bytes