Added preference listener