Fixed a cleanup bug.