fix to work on pypy2.2.2