fix span stripping for pyx