Python3 compat

This seems to work in python2 and python3...