Fixed bug in clear cache
Update bug on pref setting