Simplify1

It is impossible to run in this "if (te->id > maxId)", unless te->id exceeds the range of long long. Even if it exceeds and run in, it is buggy.