[TIMOB-13417] Gradient bug fix