Fix python compat