fixed typo in handle_packet_type