fix bug in placement of IP packet template.