workaround for issue 1255 in PyPy

see https://bugs.pypy.org/issue1255 for details