Minor bug fixes in the previous commit.