Made the destructor virtual.