Assign total leaf edge width before using that value in calculation!