Added virtual functions to destructors