Fix error with settings page refresh