FIX: NULL pointer on saving/loading factories.