avoids most infinite loops