A few bug fixes since last commit.