don't crash on empty grade table
fix error count formatting