Avoids infinite loop