tm: check if the reply transaction is defined

closes #388