small bugfixes and changes