Fixed an ARC issue when folder reference is released prematurely by caller.