Update the checking code to fix a few problems we've picked up.