fixing byte setting in CQ for index values, fixing index encoding unit test