potential non-threadsafe condition