Forgot some of the fixes in the previous commit.