This should be local variable in both methods. Currently this is not thread safe.