python 3 compat fix