fix issue with deleting comm before finalizing output refs #2943 #2941