Fixed failure in width calculation