Error checking incase smsep is zero

It can happen, if so the loops here go infinite and will crash the process.  Txpl is used as an alternative, otherwise the routine exits.