Fix getting total number