agent: Fix decoding of checks. Fixes #60