even more tests and bugfixes