Fixed error in printing statistics