Fixed some scope/settings issues