small bugfixes and cosmetic changes