Fixed a problem with Python2.