fix bug with the order of signatures in tx input