Fixed reset issue for variance and mean