increase test-coverage, fix errors