Trying to resolve issues with closure capture.