call the super class when closing