Some more bugfixes