Fixes to 3.5 compat