FIX: Crashes relating to deleted factories.