Fixed a potential NPE