Fix bug in variance()