fixes and more tests