fix 2.7 compat
fix tests