Fixed bugs from previous commit.
5.0.1