add tests, and fix missing config check