Yet more bugfixes.