fixed random span issue