Fixed a NPE.