Fixing issue with restoring settings correctly.