fixed notes insert/update