Working a little to support python 3