Fix some bugs in previous commit.