fix not close bugs. add statistics.c