Avoid infinite loop