gradient fix 2.3

I think I have finally got it.