Fixes to compile with 9.x