remove excess tail