Fixed bug with computing mean/variance in Rmag and Rout.