corrected test for error condition of bad TDC number