Fix missing end on external and fix unreachable code warning for icmp