fix calculation of user stats