Fixed free_packet and some decode work