some small bugfixes and comments