Fix 0/0 bug (mean -> median)