cot: fix infinite loop