bugfix

fix tests
remove deadcode