Fixing the threading.