Fix bugs with TNT import