Fixed cleanup bug.