Fixed some factory errors.