Fixes as reported by @ccd0.