fix segfault when rightclick on new note