Fixed bugs introduced with last commit.