Make it threadsafe.