Fixed a bug in the legend column width calculations. Fixed issue 517.