Fixed tps variable not found issue