two bugfixes