Fixed NPE's