Added missing note.setKey() instruction.