Intermediate future hangs by a thread