Fixes from application injection cherry pick.