2nd attempt at fixing bug in note editor

Continuation of #503