Fix null identifier exception when saving settings