fix some problems when attempting to verify payments on a stale/nonexistent invoice or invoice with no payments