Fix problems found in review by @infracaninophile