Bugfixes from CF test.