Python3 comapatibility fix