Fixed crash when working with notes.