removed possible inf loop
removed possible inf loop