fix python3 compat issue