Bugfixes regarding notes handling