fix python 3 compatibilty