fixed a bug in NoteService