Bugfix for NPE.