fix virtual destructors so map works properly