clear state in dispose handler.