more robust tx_from_text() (fixes issue #281)