Fix memory leak in parallel
Fix memory leak in parallel