Fixes several mistakes in the previous commit.