Fix two issues noted by @mourner