Fixed a bug in calculating width of columns.