minor bugfixes, testing