Fixed NPE found during sanity