fix build with new alert_handler interface and make test_stats.html a bit prettier