The listener must only be removed if the 'event.detail.setting' equals to 'ringtone'. Please, place that line inside the 'if' sentence.