minor fix to allow work in multithreading environment
intermediate commit