Fixed bug with too few transition in gradient