Fix and test z-score test