Fix db setup for testing

fixes #240