more tests and fix