merge part of pull request by lnkvisitor (Dmitriy Kulik) - shared static initializer