Made it work for Python 2.x

Just changed a single line to make it work on both Python 2.x and 3.x