fixed error in factory w gamma setup