Fixed bugs for last commit.