Fixed multiple problems from a previous commit.