Fixed PyPy compatibility issue