BZ-1105174: avoid NPE or new instance creation during shutdown process; sync some methods in order to avoid concurrency issues