Bugfixes to last commit.