fix tf issues