Added correct mean with weights