Make sure 'settings' is always an object.