remove a trailing pipe