fix crash with extended UnitTypeClass operator new