Fix bad imports and failing test