Feature backport singletone improvements

Please check and test /cc @narqo