fix the range of span

now it won't influence other span