small bugfixes and jdoc