Preventing an infinite loop.