some python3 fixes