cleanup some TERM detection cruft