Fix regressions in previous (squashed) commit