Minor fix in factory