fix zero variance issue