Update Pref windows and bug fix