fixed problem with python version > 3 (forgot to change the last line)