fix testcases, yet another endless loop test