Fixed potential memory leak with recursive calls to fetch