Fixed CTC. Added in tag affinity code.