Does this mean that you're no recommending to be used (ExecuteHamB) ?
Is there some other function that has the same purpose as ExecuteHamB,but which can't cause infinite loop?
No, ExecuteHamB works just fine. I was just saying something which is possible. I used it a lot of times without problems.