bugfixes and testdata