Fix regressions and issues in previous commit.