Fixed bugs on previous commit.