A few more bugfixes