more tests, fix nullpointer, fix typo