Fix a couple of regressions spotted by Danny and Alex.