fix bug where we would incorrectly use hash for failed consition; add some more debug logs