Fix test database setup