Fixes to pull_stats.php