fix infinite nest