fix processpacket