Avoid infinite interation