Added back 'calculate item width' line into calculateSizes() function