Fix attribute error introduced by previous commit.