Fixed endless loop in selectedNote(). It was causing the UI to hang when entering edit mode.