Fix factory problem