tpe: fix vector overflow defect in setup code