fix bug on get stats script