Fix minor bugs in last commit.