Minor bugfixes