Apply Paul's change to fix issue with infinite recursion