Fixed minor issues with destructor call chain.