Fix NPE crash on startup