Hand-roll the few statistics we need instead of using broken libraries.