Brought over TLC lib fixes from diagnostic