Some minor bugfixes.