Fixed ThreadLocal initialization