Fixed a NPE