fixes computation of average component size (now casted to double)