Some minor 3.1 fixes.