fixing the max legend step and legend colors.