added destructor for base class
test is working