Improve output of gradient.