pak fix the memory lost bug