fixed infinite domain loop