I added the protection on the base class for multiple calls to close