[TIMOB-13417] Gradient bug fix
Merge pull request #4792 from vishalduggal/timob-13417

[TIMOB-15494] Gradient bug fix