Fixed NPE introduced by pull request
18283567e491aa9e7ba422dfebdf6d571be862e4 (18283567)