fix absurd error in variance calculation
(#529)