Another selection of bugfixes