more tests, which exposed bugs and got fixed