fixed NPE which was introduced by change 7c26c133251a5661629894f2f93c1331ecfb107c