fix string heap cleanup