Fixing threading issues with settings