#691 - clean up thread local usage