Trying to remove infinite recursion in loader