Fix chisquared endpoint