made settings file more resilient to bad origins