Fixed bug for packet

(double free). Added intrinsics.