fix the typo in calculating edge width