Two bugfixes