Fix some bug of stat