Fixed NPE crash.