A couple more bugfixes