some more tests and bugfixes