Fix bugs with previous commit.