Minor tweaks an bugfixes.