Fixed bug in statistics for ranking task.