remove trailing boundary