fixed issues with double-delete due to inherited destructors