Add CT test and fixes.