Add width guard to comparator chain formating method