fix width calculation on widths in percentages