fix the clear preference function ok