bugfix; more tests