Increase the threadsafety of IdService