avoid thread local - fix NPE