Improve implementation of intchk.