Avoid endless loops.