Fixed some memory leaks

virtual destructor saved the day :)