Fixes from application settings cherry pick.