fixed one divide-by-zero error in the closeout method