Multiple bugfixes.