Fixed NPE.