fixed bug for bad alt handler cleanup