Fixing two regressions caused by 04f7dee4a2.