more linking fixes, plus fixing stats