Fix issues noted by @jeapostrophe.