Fixed NPE after adding a new note