Fix tf1 code and name assignment