Fix inserting spans