Fix two bugs from previous commit.