Updated robust_stats and the c code