minor fixes and mean() for DistArray