switched condition order in caught_packet fn