Backport tp fixes