python3/pypy compatibility fix