This code is not thread safe. We need to store in a thread local variable.