bugfixes, mostly related to todays earlier commit