fix bug of percent counting