fixed error in py 2.7