and yet more bugfixes