python3 compatibilty fix