small bugfixes on distribution branch