"Fix gradient. Credit to UBER."

This reverts commit af70a94565e2ce2e5af91ce9f0dc0fd1ad97d15a.