handle negative width properly