Fixed bug where number of gradient colors did not match number of bins in gradient.bar