a few small bugfixes