fixed packet handler