fixing potential race condition with app settings