some python 3 compat changes