fix analyze double cleanup