Fixed settings dialog refresh code