settings.js: Impoved error prevention