Bug-fixes for variance calculations

--BRJ and CAR