more tests + fixes