Fixed z-score bug