fix python3 compat