Changed context used for `getGradient`.