corrected error in width calculations