a couple more bugfixes