Some more minor bugfixes