Fixed the estimation of the number for the half-edges (bug report by Ilya Palachev)