tests, fix errors