Fixed a bug in TA-Elem conversion code that got exposed with debugging on.