introduce RandomSingleton, bugfixes