Improve the note id generation.