fix multithreading... atomics need initialization