fix `cleanup` global leak