Fix possible infinite recursion