Fix ip and tcp header length calculation