fix fatal bug with invalid BTCpays