Fixing memory leak with remote fetching and callbacks.