Fixed warnings about lack of virtual destructor