couple of bugfixes