Fixed a problem with python 3