Fix preference callback sample