Fixed NPE in removeTP
Fix tp roundtrip