Fix possible factory error